<%--
  @desc: 应用系统角色新增
  @author: chenw
  @create: 2014-4-29 下午 15:32
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
    .pageFormContent .textInput { width: 220px; }
    .gray { color: gray; }
    .pageFormContent .fix_p { width: 310px; }
</style>
<div class="pageContent">
    <form id="pagerForm" method="post" action="<c:url value='/sys/user/new'/>" class="pageForm required-validate"
          onsubmit="return validateCallback(this,callbackForSubmit)" rel="dlg_sys_user_view">
        <div class="pageFormContent">
            <p>
                <label for="txt_user_login_id" class="required">登录账号</label>
                <input id="txt_user_login_id" type="text" name="loginId" class="required" maxlength="50"/>
            </p>
            <p>
                <label for="txt_user_real_name">真实姓名</label>
                <input id="txt_user_real_name" type="text" name="realName" class="required" maxlength="300"/>
            </p>
            <p>
                <label for="txt_user_email">邮箱地址</label>
                <input id="txt_user_email" type="text" name="email" class="required email" maxlength="300"/>
            </p>
            <p>
                <label for="txt_user_tel">联系电话</label>
                <input id="txt_user_tel" type="text" name="tel" class="required tel" maxlength="300"/>
            </p>
            <p class="fix_p">
                <label for="txt_user_status">状态</label>
                <select id="txt_user_status" class="combox" name="status">
                    <option value="-1">锁定</option>
                    <option value="0" selected="selected">正常</option>
                    <option value="1">禁用</option>
                    <option value="2">审核</option>
                </select>
            </p>
            <p>
                <label for="txt_role_sort">排序</label>
                <input id="txt_role_sort" type="text" name="sort" class="required numberbox" maxlength="4"/>
            </p>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">保存</button>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" class="close">取消</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<script type="text/javascript">
    function callbackForSubmit(resp) {
        if (resp && resp.succ) {
            alertMsg.info("新增成功！用户名："+resp.data.loginId+"密码："+resp.data.password);
            $.pdialog.closeCurrent();
            navTab.reloadFlag("page_sys_user_list")
        } else {
            alertMsg.info(resp.msg + "!");
        }
    }
</script>